<template>
    <h1>我是新闻</h1>
    <button @click="test">测试e</button>
    <Newsdetail></Newsdetail>
    <ul>
        <li v-for="iterm in newslist">{{iterm.name}}{{iterm.time}}</li>
    </ul>
</template>
<script>
    import Newsdetail from './Newsdetail.vue'
    export default {
        data: function () {
            return { news: "news" }
        },
        props: {
            newslist: Array
        },
        components: {
            Newsdetail,
        },
        methods: {
            test() {
                var temp = this.newslist;
                console.log(temp)
                this.newslist = temp.splice(0, 1)
                console.log(this.newslist)
            }
        }
    }
</script>